<%@ page contentType="text/html; charset=utf-8" language="java"  errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- <%@ taglib prefix="s" uri="/struts-tags" %> --%>
<html>
<head>
<link href="css/register.css" rel="stylesheet" type="text/css" />
<title>用户注册</title>
<link rel="shortcut icon"href="tomcat.ico" type="image/x-icon" />	
<script type="text/javascript">
	
	function checkInput()
	{
		
		var name=document.getElementById("username").value;
		var pwd=document.getElementById("password").value;
		var pwd1=document.getElementById("password2").value;

		if(name==null||name==""){
			alert("请输入用户名！");
			document.getElementById("username").focus();
			return false;
		}

		
		if(pwd==null||pwd==""){
			alert("请输入密码！");
			document.getElementById("password").focus();
			return false;
		}

			if(pwd.length<2||pwd.length>16){
				alert("密码格式为6-16位！");
				return false;
			}
		
		   if(pwd1==null||pwd1==""){
			alert("请输入确认密码！");
			document.getElementById("password2").focus();
			return false;
		}
		
		if(pwd!=null&&pwd1!=""){
			if(pwd!=pwd1){
				alert("确认密码输入有误！");
				document.getElementById("password2").focus();
				return false;
			}
		}
		else
           return true;
	}
	
</script>

</head>
<body bgcolor="#FFFFFF" style="overflow-x:hidden;">
<div id="apDiv1"><img src="images/register_bg.png" width="100%" height="100%"></div>
<div id="apDiv2"><img src="images/register_body.png" width="419" height="255"></div>

<form id="registerform"  name="registerform" method="post" action="userAction!register" onsubmit="return checkInput()">
<div id="apDiv4"><img src="images/register_top.png" width="200" height="69"></div>
<div id="apDiv5">

  <table width="329" height="388" border="0">
    <tr>
      <td width="28" height="43">&nbsp;</td>
      <td width="276">&nbsp;</td>
      <td width="11">&nbsp;</td>
    </tr>
    <tr>
      <td height="218">&nbsp;</td>
      <td><table width="273" height="296" border="0">
        <tr>
          <td height="47"><input name="user.userName" id="username"  type="text" style= "background:Transparent;width:260px;border:none;height:30px;font-size:18px;font-weight:600;" /></td>
        </tr>
        <tr>
          <td height="28">&nbsp;</td>
        </tr>
        <tr>
          <td><input name="user.userPass" id="password" type="password" style= "background:Transparent;width:260px;border:none;height:30px;font-size:18px;font-weight:600;"  /></td>
        </tr>
        <tr>
          <td height="21">&nbsp;</td>
        </tr>
        <tr>
          <td><input name="password2" id="password2" type="password" style= "background:Transparent;width:260px;border:none;height:30px;font-size:18px;font-weight:600;"  /></td>
        </tr>
        <tr>
          <td height="36">&nbsp;</td>
        </tr>
        <tr>
          <td></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>

</div>
<div id="apDiv3">
  <table width="271" height="78" border="0">
    <tr>
      <td width="133"><input type="image" src="images/submit.png" width="89" height="51"/>
      </td>
      <td width="128"><a href="login.jsp"><img src="images/close.png" width="90" height="51" border="0"></img></td>
    </tr>
  </table>
</div>
  </form>
</body>
</html>